/* Copyright (c) [2025] [zhi1208@126.com]
 * SPDX-License-Identifier: MIT
 */

/*********************
 *      INCLUDES
 *********************/
#include "lvgl.h"
#include "hmi_status_bar.h"

/*********************
 *      DEFINES
 *********************/

/**********************
 *      TYPEDEFS
 **********************/

/**********************
 *  STATIC PROTOTYPES
 **********************/

/**********************
 *  STATIC VARIABLES
 **********************/

/**********************
 *      MACROS
 **********************/

/**********************
 *   GLOBAL FUNCTIONS
 **********************/
lv_obj_t *hmi_pg_wrap_create(lv_obj_t *parent)
{
    lv_obj_t *wrap = lv_obj_create(parent);
    lv_obj_remove_style_all(wrap);
    lv_obj_set_width(wrap, lv_pct(100));

    int32_t status_bar_h = hmi_status_bar_height();
    int32_t h = lv_display_get_vertical_resolution(lv_disp_get_default());
    lv_obj_set_height(wrap, h - status_bar_h);
    lv_obj_set_pos(wrap, 0, status_bar_h);

    return wrap;
}

/**********************
 *   STATIC FUNCTIONS
 **********************/
